#ifndef _String_h
#define _String_h

#include "CxxUtils.h"
#include "LangUtils.h"

class DoOpString
{
public: 
	class ds_string : public _DoOperator
	{
	protected: 
		ds_string(const ds_string &);
		ds_string& operator=(const ds_string &);
	public: 
		ds_string() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_length : public _DoOperator
	{
	protected: 
		ds_length(const ds_length &);
		ds_length& operator=(const ds_length &);
	public: 
		ds_length() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_get : public _DoOperator
	{
	protected: 
		ds_get(const ds_get &);
		ds_get& operator=(const ds_get &);
	public: 
		ds_get() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_put : public _DoOperator
	{
	protected: 
		ds_put(const ds_put &);
		ds_put& operator=(const ds_put &);
	public: 
		ds_put() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);		
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_getinterval : public _DoOperator
	{
	protected: 
		ds_getinterval(const ds_getinterval &);
		ds_getinterval& operator=(const ds_getinterval &);
	public: 
		ds_getinterval() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_putinterval : public _DoOperator
	{
	protected: 
		ds_putinterval(const ds_putinterval &);
		ds_putinterval& operator=(const ds_putinterval &);
	public: 
		ds_putinterval() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_copy : public _DoOperator
	{
	protected: 
		ds_copy(const ds_copy &);
		ds_copy& operator=(const ds_copy &);
	public: 
		ds_copy() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_forall : public _DoOperator
	{
	protected: 
		ds_forall(const ds_forall &);
		ds_forall& operator=(const ds_forall &);
	public: 
		ds_forall() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_anchorsearch : public _DoOperator
	{
	protected: 
		ds_anchorsearch(const ds_anchorsearch &);
		ds_anchorsearch& operator=(const ds_anchorsearch &);
	public: 
		ds_anchorsearch() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_search : public _DoOperator
	{
	protected: 
		ds_search(const ds_search &);
		ds_search& operator=(const ds_search &);
	public: 
		ds_search() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_token : public _DoOperator
	{
	protected: 
		ds_token(const ds_token &);
		ds_token& operator=(const ds_token &);
	public: 
		ds_token() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	static void push(_DoDictionaryMultimap& dict) {
		dict.put(CRefPtr< _DoObject >(new DoName("string")), CRefPtr< _DoObject >(new ds_string()));
		dict.put(CRefPtr< _DoObject >(new DoName("length")), CRefPtr< _DoObject >(new ds_length()));
		dict.put(CRefPtr< _DoObject >(new DoName("get")), CRefPtr< _DoObject >(new ds_get()));
		dict.put(CRefPtr< _DoObject >(new DoName("put")), CRefPtr< _DoObject >(new ds_put()));
		dict.put(CRefPtr< _DoObject >(new DoName("getinterval")), CRefPtr< _DoObject >(new ds_getinterval()));
		dict.put(CRefPtr< _DoObject >(new DoName("putinterval")), CRefPtr< _DoObject >(new ds_putinterval()));
		dict.put(CRefPtr< _DoObject >(new DoName("copy")), CRefPtr< _DoObject >(new ds_copy()));
		dict.put(CRefPtr< _DoObject >(new DoName("forall")), CRefPtr< _DoObject >(new ds_forall()));
		dict.put(CRefPtr< _DoObject >(new DoName("anchorsearch")), CRefPtr< _DoObject >(new ds_anchorsearch()));
		dict.put(CRefPtr< _DoObject >(new DoName("search")), CRefPtr< _DoObject >(new ds_search()));
		dict.put(CRefPtr< _DoObject >(new DoName("token")), CRefPtr< _DoObject >(new ds_token()));
	}
};

#endif
